<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>UCARPP: includes/parser-tools.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">UCARPP
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('parser-tools_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">includes/parser-tools.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="lex-tools_8h_source.html">lex-tools.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="lexer_8h_source.html">lexer.h</a>&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for parser-tools.h:</div>
<div class="dyncontent">
<div class="center"><img src="parser-tools_8h__incl.png" border="0" usemap="#includes_2parser-tools_8h" alt=""/></div>
<map name="includes_2parser-tools_8h" id="includes_2parser-tools_8h">
<area shape="rect" id="node3" href="lex-tools_8h.html" title="lex&#45;tools.h" alt="" coords="93,83,176,112"/><area shape="rect" id="node9" href="lexer_8h.html" title="lexer.h" alt="" coords="239,83,300,112"/></map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="parser-tools_8h__dep__incl.png" border="0" usemap="#includes_2parser-tools_8hdep" alt=""/></div>
<map name="includes_2parser-tools_8hdep" id="includes_2parser-tools_8hdep">
<area shape="rect" id="node3" href="parser_8h.html" title="includes/parser.h" alt="" coords="21,83,141,112"/></map>
</div>
</div>
<p><a href="parser-tools_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="parser-tools_8h.html#ad253dbb6619aa9bab37db27cda17502e">parseerror</a> (int tokenexpected)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="parser-tools_8h.html#a041249f802c5bf4c2deae666610e03c4">next</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="unionLexVal.html">LexVal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="parser-tools_8h.html#aedb67f5456a2fe0f21165cda5ce446d6">match</a> (int token)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="parser-tools_8h.html#aefb3c71563a74bb0cd03f522251457a1">truncateQuotes</a> (char *str)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="parser-tools_8h.html#a3d80b0160c9017df753c6af26ca45ad1">lookahead</a></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="aedb67f5456a2fe0f21165cda5ce446d6"></a><!-- doxytag: member="parser&#45;tools.h::match" ref="aedb67f5456a2fe0f21165cda5ce446d6" args="(int token)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="unionLexVal.html">LexVal</a> <a class="el" href="parser-tools_8h.html#aedb67f5456a2fe0f21165cda5ce446d6">match</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>token</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>controlla che la variabile lookahead coincida con il token passato come parametro. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">token</td><td>il simbolo da confrontare con lookahead </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>se token==lookahead esegue <a class="el" href="parser-tools_8h.html#a041249f802c5bf4c2deae666610e03c4">next()</a> e ritorna tutte le informazioni relative al vecchio lookahead symbol se token!=lookahead mostra un messaggio d'errore </dd></dl>

</div>
</div>
<a class="anchor" id="a041249f802c5bf4c2deae666610e03c4"></a><!-- doxytag: member="parser&#45;tools.h::next" ref="a041249f802c5bf4c2deae666610e03c4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="parser-tools_8h.html#a041249f802c5bf4c2deae666610e03c4">next</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>aggiorna il lookahead character con il prossimo token letto dal file passato in parse. richiamare la funzione parse prima di utilizzare questo comando </p>

</div>
</div>
<a class="anchor" id="ad253dbb6619aa9bab37db27cda17502e"></a><!-- doxytag: member="parser&#45;tools.h::parseerror" ref="ad253dbb6619aa9bab37db27cda17502e" args="(int tokenexpected)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="parser-tools_8h.html#ad253dbb6619aa9bab37db27cda17502e">parseerror</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>tokenexpected</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>genera un errore di simbolo non aspettato</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tokenexpected</td><td>il simbolo che si stava aspettando </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aefb3c71563a74bb0cd03f522251457a1"></a><!-- doxytag: member="parser&#45;tools.h::truncateQuotes" ref="aefb3c71563a74bb0cd03f522251457a1" args="(char *str)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="parser-tools_8h.html#aefb3c71563a74bb0cd03f522251457a1">truncateQuotes</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>rimuove le quote di una strings iniziali e finali. Per esempio: </p>
<table class="doxtable">
<tr>
<th>stringa iniziale </th><th>stringa finale  </th></tr>
<tr>
<td>"ciao" </td><td>ciao  </td></tr>
<tr>
<td>"dissi: "bene"." </td><td>dissi: "bene".  </td></tr>
</table>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>all'inizio e alla fine della stringa ci devono essere i i quoting (") </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>una nuova istanza di una stringa e' allocata in memoria. <b>Deve essere liberata manualemente</b></li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>la stringa da modificare </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>la stringa originale in cui i quoting iniziali e finali sono eliminati </dd></dl>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a3d80b0160c9017df753c6af26ca45ad1"></a><!-- doxytag: member="parser&#45;tools.h::lookahead" ref="a3d80b0160c9017df753c6af26ca45ad1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="parser-tools_8h.html#a3d80b0160c9017df753c6af26ca45ad1">lookahead</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="parser-tools_8h.html">parser-tools.h</a>      </li>

    <li class="footer">Generated on Thu Jun 27 2013 11:34:37 for UCARPP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
